package com.magenta.maxoptra.gis.utils;

import com.magenta.maxoptra.gis.GeographicCoordinates;

import java.util.List;

/**
 * @author Sergey Grachev
 */
public class GetCoordinateToCoordinateRoutesProfiler extends AbstractGisProfiler {

    private String coordsDefinition = "";

    public GetCoordinateToCoordinateRoutesProfiler(String provider, String accountGlobalId, boolean enableProfiling, List<? extends GeographicCoordinates> coordinates) {
        super(provider, accountGlobalId, enableProfiling);
        for (GeographicCoordinates c : coordinates) {
            coordsDefinition = coordsDefinition + printPoint(c) + ":";
        }
    }

    @Override
    public String getInitialInfo() {
        return provider + separator + accountGlobalId + separator + coordsDefinition;
    }

    public void logDuration(int size) {
        logDuration("pathPoints.count:" + size);
    }

}

